import { base, axiosInstance } from '@/api/config';

//招生政策
const ePolicySave = params => {
  return axiosInstance.post(`${base}/admissionsPolicy/save`, params);
}; //新增
const ePolicyList = params => {
  return axiosInstance.get(`${base}/admissionsPolicy/list`, {params: params});
}; //列表
const ePolicyDelete = params => {
  return axiosInstance.delete(`${base}/admissionsPolicy/delete`, {data: params});
};//删除
const ePolicyUpdate = params => {
  return axiosInstance.put(`${base}/admissionsPolicy/update`, params);
};//修改

//招生计划
const ePlanSave = params => {
  return axiosInstance.post(`${base}/admissionsPlan/save`, params);
}; //新增
const ePlanList = params => {
  return axiosInstance.get(`${base}/admissionsPlan/list`, {params: params});
}; //列表
const ePlanDelete = params => {
  return axiosInstance.delete(`${base}/admissionsPlan/delete`, {data: params});
};//删除
const ePlanUpdate = params => {
  return axiosInstance.put(`${base}/admissionsPlan/update`, params);
};//修改

/*基本数据*/
let infoPublish = {

  //招生政策
  enrollmentpolicy: {
    save: ePolicySave,
    list: ePolicyList,
    delete: ePolicyDelete,
    update: ePolicyUpdate,
  },
  //招生计划
  enrollmentplan: {
    save: ePlanSave,
    list: ePlanList,
    delete: ePlanDelete,
    update: ePlanUpdate,
  },
};
export { infoPublish }
